<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2021/12/6
 * Time: 21:47
 */
print_r($_FILES);

function UploadAction(){
    if(is_array($_FILES['file']['name'])){
        $count = count($_FILES['file']['name']);
        for($i=0;$i<$count;$i++){
            move_uploaded_file($_FILES['file']['tmp_name'][$i],'error/'.$_FILES['file']['name'][$i]);
        }
    }else{
        move_uploaded_file($_FILES['file']['tmp_name'],'error/'.$_FILES['file']['name']);
    }
}